package com.wwlwxg.jdk.server;


import org.apache.cxf.jaxws.JaxWsServerFactoryBean;

public class Server {

    public static void main(String[] args) {
        System.out.println("web service start ... ");
        HelloWorld helloWorld = new HelloWorldImpl();
        String address = "http://192.168.56.1/helloworld";
//        Endpoint.publish(address, helloWorld);
        JaxWsServerFactoryBean factoryBean = new JaxWsServerFactoryBean();
        factoryBean.setAddress(address);
        factoryBean.setServiceClass(HelloWorld.class);
        factoryBean.setServiceBean(helloWorld);
        factoryBean.create();
        System.out.println("web service started");
    }
}
